package com.yueya.business.knowledge.model;

import com.jfinal.kit.StrKit;
import com.jfinal.plugin.activerecord.Model;

@SuppressWarnings("serial")
public class KnowledgeText extends Model<KnowledgeText> {
	
	public static final KnowledgeText dao = new KnowledgeText();
	
	public KnowledgeText findByKnowledgeId(String knowledgeId) {
		if(StrKit.isBlank(knowledgeId)) return null;
		String sql = "select kt.* from jg_knowledge_text kt left join jg_knowledge k on k.knowledge_id = kt.knowledge_id where k.knowledge_id = ?";
		return dao.findFirst(sql, knowledgeId);
	}

}
